import type {baseResponse, listResponse, paramsType} from "@/api/index";
import {useAxios} from "@/api/index";
import type {aiRoleType} from "@/api/ai_role_api";

export interface aiRoleOrderType {
    "id": number
    "createdAt": string
    "reason": string
    "userID": number
    "aiRoleID": number
    "type": number
    "status": number
    "aiRoleUpdateData"?: aiRoleType
    "aiRoleTitle": string
    "aiRoleAvatar": string
    "userTitle": string
    "userAvatar": string
}

export function aiRoleOrderListApi(params: paramsType): Promise<baseResponse<listResponse<aiRoleOrderType>>> {
    return useAxios.get("/api/ai_role/work_order", {params})
}

export interface aiRoleOrderUpdateType {
    id: number
    status: number
}

export function aiRoleOrderUpdateApi(data: aiRoleOrderUpdateType): Promise<baseResponse<string>> {
    return useAxios.put("/api/ai_role/work_order", data)
}
